<?php

defined('ABSPATH') || exit;

if (!class_exists('CSF')) {
    return;
}

$prefix = '_ripro_post_options';

CSF::createSection($prefix, array(
    'title'  => '主题或者插件信息',
    'fields' => array(

        array(
            'id' => 'theme_gallery',
            'type' => 'gallery',
            'title' => '主题图片库',
        ),

        array(
            'id' => 'version_name',
            'type' => 'select',
            'options' => array(
                'premium' => '专业付费版',
                'free' => '免费版',
            ),
            'title' => '版本名称',
            'default' => 'premium'
        ),

        array(
            'id' => 'language_type',
            'type' => 'select',
            'options' => array(
                'chinese' => '汉化版',
                'english' => '英文版',
            ),
            'title' => '语言界面',
            'default' => 'english'
        ),

        array(
            'id' => 'theme_original',
            'type' => 'switcher',
            'default' => false,
            'title' => '原创还是转载',
            'text_on' => '原创',
            'text_off' => '转载'
        ),

        array(
            'id'       => 'official_url',
            'type'     => 'text',
            'title'    => '资源官网',
        ),

        array(
            'id'       => 'dashboard_url',
            'type'     => 'text',
            'title'    => '后台预览网址',
        ),

        array(
            'id'       => 'virus_report_url',
            'type'     => 'text',
            'title'    => '病毒扫描报告网址',
        ),

        array(
            'id'       => 'theme_short_desc',
            'type'     => 'textarea',
            'title'    => '功能简述',
        )

    ),
));


CSF::createSection(_OPTIONS_PRE, array(
    'title'  => '短信设置',
    'fields' => array(

        array(
            'id'      => 'sms_open',
            'type'    => 'switcher',
            'title'   => '是否开启短信',
            'desc'    => '开启全站的短信功能',
            'default' => false,
            'text_on' => '开启',
            'text_off'=> '关闭'
        ),

        array(
            'id'      => 'sms_access_key_id',
            'type'    => 'text',
            'title'   => 'AccessKeyId',
            'desc'    => '阿里云API的ACCESS_KEY_ID',
            'default' => "LTAI4FbgZbZshgiPEsW5eXwt",
            'dependency' => array( 'sms_open', '==', 'true' ),
        ),

        array(
            'id'      => 'sms_access_key_secret',
            'type'    => 'text',
            'title'   => 'AccessKeySecret',
            'desc'    => '阿里云API的ACCESS_KEY_Secret',
            'default' => 'JxEeTiNOIFBBygMFJILaBwGcjAnEvK',
            'dependency' => array( 'sms_open', '==','true')
        ),

        array(
            'id'      => 'sms_sign_name',
            'type'    => 'text',
            'title'   => '短信签名',
            'desc'    => '阿里云短信签名',
            'default' => '圈豆缘',
            'dependency' => array( 'sms_open', '==','true')
        ),

        array(
            'id'      => 'sms_template_code',
            'type'    => 'text',
            'title'   => '短信模板代号',
            'desc'    => '阿里云短信模板templateCode',
            'default' => 'SMS_182552287',
            'dependency' => array( 'sms_open', '==','true')
        ),

        array(
            'id'      => 'sms_template_param',
            'type'    => 'text',
            'title'   => '短信模板短信内变量',
            'desc'    => '阿里云短信模板变量templateParam（例如：验证码）',
            'default' => 'code',
            'dependency' => array( 'sms_open', '==','true')
        )
    ),
));